<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            padding-top: 10px;
            width: 600px;
            height: 450px;
            background-color: #666; 
            position: absolute;
            left: 50%;
            top: 60px;
            transform: translate(-50%);
            padding-left: 40px;
        }
        h3{
            color: #fff;
        }
        body{
            background-color: #ccc;
            position: relative;
        }
        .box label{
            display: inline-block;
            width: 80px;
            text-align: right;
            color: #fff;
        }
        button{
            width: 60px;
            height: 30px;
        }
    </style>
</head>
<body>
    <div class="box">
        <h3>普通公司管理系统</h3>
        <p><label>编号：</label><input id="q" type="text"></p>
        <p><label>姓名：</label><input id="w" type="text"></p>
        <p><label>入职时间：</label><input id="e" type="text"></p>
        <p><label>加入时间：</label><input id="r" type="text"></p>
        <p><label>曾任职：</label><input id="t" type="text"></p>
        <p><label>新职位：</label><input id="y" type="text"></p>
        <p><label>星际：</label><input id="u" type="text"></p>
        <p><label>图片：</label><input id="i" type="text"></p>
        <button id="bu">注册</button>
    </div>
</body>
<script>
    var m=sessionStorage.zz
    console.log(m)
    if(!m){
        location.href="./11.html"
    }


    var g=location.search.slice(1)


    document.getElementById('bu').onclick=function(){
        var i=-1
        for(var h in k[g]){
            i++
            k[g][h]=document.getElementsByTagName("input")[i].value
        }
        var sk=JSON.stringify(k)

        sessionStorage.dat=sk
        location.href="./22.html?1"
    }


    var kk=sessionStorage.data
    k=JSON.parse(kk)
    console.log(k[g])
    var i=-1
    for(var h in k[g]){
        i++
        document.getElementsByTagName("input")[i].value=k[g][h]
    }
</script>
</html>